package laMalinche.AnnotatedRules;

import laMalinche.rete.rule.Action;
import laMalinche.rete.rule.ActionType;

/**
 * Created by IntelliJ IDEA.
 * User: ranran
 * Date: Aug 15, 2009
 * Time: 9:54:35 AM
 * To change this template use File | Settings | File Templates.
 */
public class AnnotatedMethodToAction  implements Action {
    AnnotateMethod annotateMethod;

    public AnnotatedMethodToAction(AnnotateMethod annotateMethod) {
        this.annotateMethod = annotateMethod;
    }

    public ActionType getActionType() {
        // todo
        return ActionType.other; 
    }

    public void execute() {
         annotateMethod.invoke();
    }

    public String getName() {
        return annotateMethod.getMethod().getName();
    }
}
